package com.chb.microservice.provider.feign;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.cbh.api.model.ApiResult;
import com.chb.microservice.provider.model.Area;

@FeignClient(name = "cbh-general-rest")
public interface AreaFeignClient {

	/**
	 * 保存开放区域信息
	 * 
	 * @param product
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/areas", method = RequestMethod.POST, produces = "application/json")
	public ApiResult<String> save(@RequestBody(required = true) Area ob);

	/**
	 * 获取全部开放区域信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/areas", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<List<Area>> getAll();

	/**
	 * 获取开放区域信息
	 * 
	 * @param proId
	 * @return
	 */
	@RequestMapping(value = "/sign/v3/areas/{id}", method = RequestMethod.GET, produces = "application/json")
	public ApiResult<Area> getOne(@PathVariable("id") String id);

}
